package com.zifan.st_geometry.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zifan.st_geometry.mapper.STGeometryMapper;
import com.zifan.st_geometry.model.STGeometry;

@Service
public class STGeometryServiceImpl implements STGeometryService {

	@Autowired
	private STGeometryMapper stGeometryMapper;

	@Override
	public void saveGeometry(STGeometry geometry) {
		// TODO Auto-generated method stub
		stGeometryMapper.saveGeometryToTable(geometry);
	}

	@Override
	public List<HashMap<String, Object>> queryIntersect(String srcTableName, String targetTableName, String[] fields,
			String where, int srId) {
		// TODO Auto-generated method stub
		return stGeometryMapper.queryIntersectByWhere(srcTableName, targetTableName, fields, where, srId);
	}

	@Override
	public List<HashMap<String, Object>> queryIntersect(String targetTableName, String[] fields, String wkt, int srId) {
		// TODO Auto-generated method stub
		return stGeometryMapper.queryIntersectByWKT(targetTableName, fields, wkt, srId);
	}

}
